package com.wn.ticket.web;

import com.wn.ticket.common.ResponseEntity;
import com.wn.ticket.entity.Perform;
import com.wn.ticket.service.PerformService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author zhairenhao
 * @date 2022/9/1 14:13
 */
@RestController
@RequestMapping("/front/show")
public class ShowDetailsController {
    @Autowired
    private PerformService performService;

    //演出详情
    @GetMapping("/get")
    public ResponseEntity<Perform> getById(int id) {
        Perform perform = performService.getById(id);
        return new ResponseEntity(perform);
    }
}
